/** 
  Copyright (c) 2008, 2009 Claudio Imbrenda
  This program is released under the terms of the
  GNU GPL version 3 or later.
*/

package macchina;

/**
 * Wrapper interface around Macchina. Needed to hide all non-instruction 
 * methods to instructions.
 * @author Claudio Imbrenda
 */
public interface Macchinina {
    
    /**
    * Wrapper for getTM().
    * @return getTM().
    */
   public int readTM();
   
   /**
    * Wrapper for getTI().
    * @return getTI().
    */
   public int readTI();
   
   /**
    * Wrapper for getA().
    * @return getA().
    */
   public int readA();
   /**
    * Wrapper for getB().
    * @return getB().
    */
   public int readB();
   /**
    * Wrapper for getN().
    * @return getN().
    */
   public int readN();
   /**
    * Wrapper for setA().
    * @param v same as setA(v).
    */
   public void writeA(int v);
   /**
    * Wrapper for setB().
    * @param v same as setB(v).
    */   
   public void writeB(int v);
    /**
    * Wrapper for setN().
    * @param v same as setN(v).
    */ 
   public void writeN(short v);
    /**
    * Wrapper for setN().
    * @param v same as setN(v).
    */ 
   public void writeN(int v);
   
   /**
    * Wrapper for readFromAE().
    * @return readFromAE().
    */
   public byte readAE();
   
    /**
    * Wrapper for getAC().
    * @return getAC().
    */
   public boolean readAC();
   
   /**
    * Wrapper for writeToRU(b).
    * @param b same as writeToRU(b).
    */
   public void writeRU(byte b);
   /**
    * Wrapper for writeToRU(b).
    * @param b same as writeToRU(b).
    */
   public void writeRU(int b);
      
   /**
    * Wrapper for getMEM(a).
    * @param a same as getMEM(a).
    * @return getMEM(a).
    */
   public int readMEM(short a);
   /**
    * Wrapper for setMEM(a,v).
    * @param a same as setMEM(a,v).
    * @param v same as setMEM(a,v).
    */
   public void writeMEM(short a,int v);
   
   /**
    * Sets the running flag to the given value.
    * @param b the value to set running to.
    */
   public void setRunning(boolean b);
  
}
